<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>测试接口</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/axios/0.20.0-0/axios.min.js"></script>
</head>

<body id="body">

</body>
<script>
    axios({
        method: 'post',
        url: 'http://127.0.0.1:7001/api/adduserList',
        data: {
            id: 1,
            name:'admin',
            password:12344343434,
            phone: 1236777,
            age:17
        },
        headers: {
            // 切记 token 不要直接发送，要在前面加上 Bearer 字符串和一个空格
            'Authorization': `Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoiYWRtaW4iLCJpYXQiOjE1OTYwMjQxMTh9.s-hMVXY5cvNsVcyPrO0FLPP7TspV6UFcysPe3tiPV0o`
        }
    }).then(res => {
        console.log(res.data)
        document.getElementById('body').innerText = JSON.stringify(res.data)

    })
</script>

</html>